package models;

import play.db.jpa.Model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.util.Date;

@Entity
public class Category extends Model {

    public String name;
    public String description;
    public Date createdOn;
    public Date deletedOn;

    @ManyToOne
    public User createdBy;

    @ManyToOne
    public User deletedBy;

    public Category(String name, String description) {
        this.name = name;
        this.description = description;
    }
    
    @Override
    public String toString() {
        return this.name;    //To change body of overridden methods use File | Settings | File Templates.
    }
}
